<% layout('/layouts/default.html', {title: '服务认证管理', libs: ['validate','fileupload']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header with-border">
			<div class="box-title">
				<i class="fa icon-note"></i> ${text(kjIntegralAuth.isNewRecord ? '新增服务认证' : '编辑服务认证')}
			</div>
			<div class="box-tools pull-right">
				<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
			</div>
		</div>
		<#form:form id="inputForm" model="${kjIntegralAuth}" action="${ctx}/kj/kjIntegralAuth/save" method="post" class="form-horizontal">
			<div class="box-body">
				<div class="form-unit">${text('基本信息')}</div>
				<#form:hidden path="id"/>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required ">*</span> ${text('服务名')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="serviceName" maxlength="255" class="form-control required"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required ">*</span> ${text('服务类型')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:select path="serviceType" dictType="service_type" blankOption="true" class="form-control required width-120 "/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required ">*</span> ${text('服务时长(小时)')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="totalHour" class="form-control required number"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required ">*</span> ${text('服务时间')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="serviceTime" readonly="true" maxlength="20" class="form-control laydate required"
									dataFormat="datetime" data-type="datetime" data-format="yyyy-MM-dd HH:mm"/>
							</div>
						</div>
					</div>

					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('国家')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="country" maxlength="255" class="form-control"/>
							</div>
						</div>
					</div>

					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('省')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="province" maxlength="255" class="form-control"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('市')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="city" maxlength="255" class="form-control"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('区')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="region" maxlength="255" class="form-control"/>
							</div>
						</div>
					</div>

					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2" title="">
								<span class="required ">*</span> ${text('详细地址')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-10">
								<#form:input path="address" maxlength="255" class="form-control required"/>
							</div>
						</div>
					</div>
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2" title="">
								<span class="required hide">*</span> ${text('服务图片')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-10">
								<#form:fileupload id="uploadImage3" returnPath="true"
								filePathInputId="imgs" maxUploadNum="3"
								uploadType="all" class="required " readonly="false" preview="true" imageMaxWidth="-1" imageMaxHeight="-1"/>
								<#form:input path="imgs" class="form-control hide"/>
							</div>
						</div>
					</div>
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2" title="">
								<span class="required hide">*</span> ${text('服务介绍')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-10">
								<#form:input path="description" class="form-control"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required">*</span> ${text('审核状态')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:select path="approveStatus" dictType="approve_status" class="form-control width-120 required"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required">*</span> ${text('可获得积分')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="integrals" max="99999" dataFormat="number2" class="form-control number required"/>
							</div>
						</div>
					</div>

					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required">*</span> ${text('岗位类型')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:listselect id="testUser3" title="岗位类型"
								path="jobTypeId"   labelPath="jobTypeName"
								url="${ctx}/kj/kjJobType/kjJobTypeSelect" allowClear="false"
								checkbox="false" itemCode="id" itemName="typeName" class="required"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('审核备注')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="approveRemarks" maxlength="255" class="form-control"/>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="box-footer">
				<div class="row">
					<div class="col-sm-offset-2 col-sm-10">
						<% if (hasPermi('kj:kjIntegralAuth:edit') && (kjIntegralAuth.isNewRecord || kjIntegralAuth.approveStatus == "0")){ %>
							<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> ${text('保 存')}</button>&nbsp;
						<% } %>
						<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> ${text('关 闭')}</button>
					</div>
				</div>
			</div>
		</#form:form>
	</div>
</div>
<% } %>
<script>
$("#inputForm").validate({
	submitHandler: function(form){
		js.ajaxSubmitForm($(form), function(data){
			js.showMessage(data.message);
			if(data.result == Global.TRUE){
				js.closeCurrentTabPage(function(contentWindow){
					contentWindow.page();
				});
			}
		}, "json");
    }
});
</script>
